package com.aspose.cells;

class zx extends zck {
   zx(zn var1, float var2, float var3, zbkr var4) {
      super(var1, var2, var3, var4);
      switch(this.e.b) {
      case 1:
      default:
         break;
      case 2:
         com.aspose.cells.b.a.b.a.zi var5 = new com.aspose.cells.b.a.b.a.zi(1.0F, 0.0F, 0.0F, -1.0F, 0.0F, this.e.S().i());
         this.a.b(var5);
         break;
      case 3:
         com.aspose.cells.b.a.b.a.zi var6 = new com.aspose.cells.b.a.b.a.zi(-1.0F, 0.0F, 0.0F, -1.0F, this.e.S().h(), this.e.S().i());
         this.a.b(var6);
         break;
      case 4:
         com.aspose.cells.b.a.b.a.zi var7 = new com.aspose.cells.b.a.b.a.zi(-1.0F, 0.0F, 0.0F, 1.0F, this.e.S().h(), 0.0F);
         this.a.b(var7);
      }

   }

   void b() {
      com.aspose.cells.b.a.b.a.ze var1 = new com.aspose.cells.b.a.b.a.ze();
      float var2 = this.e.s();
      float var3 = this.e.t();
      float var4 = this.e.q();
      float var5 = this.e.r();
      float var6 = 0.0F;
      float var7 = 0.0F;
      float var8 = 0.0F;
      float var9 = 0.0F;
      if (this.e.m != null) {
         if (this.e.m.a.size() > 0) {
            var6 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 100000.0F * this.e.q();
            var7 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(3)) / 100000.0F * this.e.q();
            var8 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F * this.e.r();
            var9 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(2)) / 100000.0F * this.e.r();
         } else {
            var6 = -0.08333F * this.e.q();
            var7 = -0.38333F * this.e.q();
            var8 = 0.1875F * this.e.r();
            var9 = 1.125F * this.e.r();
         }
      } else {
         var6 = -0.08333F * this.e.q();
         var7 = -0.38333F * this.e.q();
         var8 = 0.1875F * this.e.r();
         var9 = 1.125F * this.e.r();
      }

      float var10 = var6 > var7 ? var7 : var6;
      float var11 = var6 < var7 ? var7 : var6;
      float var12 = var8 > var9 ? var9 : var8;
      float var13 = var8 < var9 ? var9 : var8;
      float var14 = 0.0F;
      float var15 = 0.0F;
      float var16 = 0.0F;
      float var17 = 0.0F;
      if (var10 < 0.0F) {
         var14 = -var10;
      }

      if (var11 > var4) {
         var15 = var11 - var4;
      }

      if (var13 > var5) {
         var17 = var13 - var5;
      }

      if (var12 < 0.0F) {
         var16 = -var12;
      }

      if (this.e.R()) {
         var6 = -var6 + var4;
         var7 = -var7 + var4;
         var14 = var15;
      }

      if (this.e.Q()) {
         var8 = -var8 + var5;
         var9 = -var9 + var5;
         var16 = var17;
      }

      com.aspose.cells.b.a.b.zq var18 = new com.aspose.cells.b.a.b.zq(var2 + var14, var3 + var16, var4, var5);
      com.aspose.cells.b.a.b.a.ze var19 = new com.aspose.cells.b.a.b.a.ze();
      var19.b(var18);
      com.aspose.cells.b.a.b.zc var20 = zbum.a(this.e.w(), var19);
      com.aspose.cells.b.a.b.zm var21 = zbum.a(this.e.x());
      if (!this.e.w().a()) {
         var1.b(var18);
         this.a.a(var20, var1);
      }

      this.a.b(var21, var2 + var6 + var14, var3 + var8 + var16, var2 + var7 + var14, var3 + var9 + var16);
      this.a.b(var21, var2 + var6 + var14, var3 + var16, var2 + var6 + var14, var3 + var5 + var16);
      this.a();
   }

   void a() {
      float var1 = this.e.s();
      float var2 = this.e.t();
      float var3 = this.e.q();
      float var4 = this.e.r();
      float var5 = 0.0F;
      float var6 = 0.0F;
      float var7 = 0.0F;
      float var8 = 0.0F;
      if (this.e.m != null) {
         var5 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(1)) / 100000.0F * this.e.q();
         var6 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(3)) / 100000.0F * this.e.q();
         var7 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(0)) / 100000.0F * this.e.r();
         var8 = com.aspose.cells.b.a.ze.a(this.e.m.a.get(2)) / 100000.0F * this.e.r();
      } else {
         var5 = -0.08333F * this.e.q();
         var6 = -0.38333F * this.e.q();
         var7 = 0.1875F * this.e.r();
         var8 = 1.125F * this.e.r();
      }

      float var9 = var5 > var6 ? var6 : var5;
      float var10 = var5 < var6 ? var6 : var5;
      float var11 = var7 > var8 ? var8 : var7;
      float var12 = var7 < var8 ? var8 : var7;
      float var13 = 0.0F;
      float var14 = 0.0F;
      float var15 = 0.0F;
      float var16 = 0.0F;
      if (var9 < 0.0F) {
         var13 = -var9;
      }

      if (var10 > var3) {
         var14 = var10 - var3;
      }

      if (var12 > var4) {
         var16 = var12 - var4;
      }

      if (var11 < 0.0F) {
         var15 = -var11;
      }

      if (this.e.R()) {
         var5 = -var5 + var3;
         var6 = -var6 + var3;
         var13 = var14;
      }

      if (this.e.Q()) {
         var7 = -var7 + var4;
         var8 = -var8 + var4;
         var15 = var16;
      }

      com.aspose.cells.b.a.b.zq var17 = new com.aspose.cells.b.a.b.zq(var1 + var13, var2 + var15, var3, var4);
      this.c(var17);
   }
}
